package com.example.demo.controller;

import com.example.demo.entity.TimeEntity;
import com.example.demo.service.TimeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

@Controller
public class TimeController {
    @Autowired
    private TimeService timeService;

    @RequestMapping("selectByTimeid")
    @ResponseBody
    public TimeEntity selectByTimeid(int timeid){
        return timeService.selectByTimeid(timeid);
    }
    @RequestMapping("selectAllTime")
    @ResponseBody
     public List<TimeEntity> selectAllTime(){
        return timeService.selectAllTime();
     }
}
